package org.grapes.wine.api.client.method.proxy;

import java.util.List;

import org.grapes.wine.api.client.method.impl.MethodCheckApp;
import org.grapes.wine.api.client.method.impl.MethodGetAdjoinedLandscapeDistance;
import org.grapes.wine.api.client.method.impl.MethodGetAdjoinedLandscapeLocation;
import org.grapes.wine.api.client.method.impl.MethodGetAdjoinedLandscapePrice;
import org.grapes.wine.api.client.method.impl.MethodGetAdjoinedLandscapeTime;
import org.grapes.wine.api.client.method.impl.MethodGetCostomIntroduction;
import org.grapes.wine.api.client.method.impl.MethodGetCostomRelativeLandscape;
import org.grapes.wine.api.client.method.impl.MethodGetFeaturedCourseDaySum;
import org.grapes.wine.api.client.method.impl.MethodGetFeaturedCourseIntroduction;
import org.grapes.wine.api.client.method.impl.MethodGetHotelInfoHotelIntroduction;
import org.grapes.wine.api.client.method.impl.MethodGetLandscapeIntroduction;
import org.grapes.wine.api.client.method.impl.MethodGetLandscapeSerial;
import org.grapes.wine.api.client.method.impl.MethodGetLandscapeSightInvolved;
import org.grapes.wine.api.client.method.impl.MethodGetLandscapeTicketPrice;
import org.grapes.wine.api.client.method.impl.MethodGetLandscapeVisitTime;
import org.grapes.wine.api.client.method.impl.MethodGetPath2BYDRoute;
import org.grapes.wine.api.client.method.impl.MethodGetUserId;
import org.grapes.wine.api.client.method.impl.MethodGetYachtCapacity;
import org.grapes.wine.api.client.method.impl.MethodGetYachtPrice;
import org.grapes.wine.api.client.method.impl.MethodSearchAdjoinedLandscape;
import org.grapes.wine.api.client.method.impl.MethodSearchCostom;
import org.grapes.wine.api.client.method.impl.MethodSearchFeaturedCourse;
import org.grapes.wine.api.client.method.impl.MethodSearchHotelInfo;
import org.grapes.wine.api.client.method.impl.MethodSearchLandscape;
import org.grapes.wine.api.client.method.impl.MethodSearchPath2BYD;
import org.grapes.wine.api.client.method.impl.MethodSearchYacht;
import org.grapes.wine.api.method.iface.IMethodCheckApp;
import org.grapes.wine.api.method.iface.IMethodGetAdjoinedLandscapeDistance;
import org.grapes.wine.api.method.iface.IMethodGetAdjoinedLandscapeLocation;
import org.grapes.wine.api.method.iface.IMethodGetAdjoinedLandscapePrice;
import org.grapes.wine.api.method.iface.IMethodGetAdjoinedLandscapeTime;
import org.grapes.wine.api.method.iface.IMethodGetCostomIntroduction;
import org.grapes.wine.api.method.iface.IMethodGetCostomRelativeLandscape;
import org.grapes.wine.api.method.iface.IMethodGetFeaturedCourseDaySum;
import org.grapes.wine.api.method.iface.IMethodGetFeaturedCourseIntroduction;
import org.grapes.wine.api.method.iface.IMethodGetHotelInfoHotelIntroduction;
import org.grapes.wine.api.method.iface.IMethodGetLandscapeIntroduction;
import org.grapes.wine.api.method.iface.IMethodGetLandscapeSerial;
import org.grapes.wine.api.method.iface.IMethodGetLandscapeSightInvolved;
import org.grapes.wine.api.method.iface.IMethodGetLandscapeTicketPrice;
import org.grapes.wine.api.method.iface.IMethodGetLandscapeVisitTime;
import org.grapes.wine.api.method.iface.IMethodGetPath2BYDRoute;
import org.grapes.wine.api.method.iface.IMethodGetUserId;
import org.grapes.wine.api.method.iface.IMethodGetYachtCapacity;
import org.grapes.wine.api.method.iface.IMethodGetYachtPrice;
import org.grapes.wine.api.method.iface.IMethodSearchAdjoinedLandscape;
import org.grapes.wine.api.method.iface.IMethodSearchCostom;
import org.grapes.wine.api.method.iface.IMethodSearchFeaturedCourse;
import org.grapes.wine.api.method.iface.IMethodSearchHotelInfo;
import org.grapes.wine.api.method.iface.IMethodSearchLandscape;
import org.grapes.wine.api.method.iface.IMethodSearchPath2BYD;
import org.grapes.wine.api.method.iface.IMethodSearchYacht;

/**
 * ProxyWineMethod class cannot extend any class. This class is extended by
 * GrapeRestClient class.
 * 
 * @author Randolph Cao
 * 
 */
public class ProxyWineMethod implements
		IMethodGetAdjoinedLandscapeDistance,
		IMethodGetAdjoinedLandscapeLocation,
		IMethodGetAdjoinedLandscapePrice,
		IMethodGetAdjoinedLandscapeTime,
		IMethodGetCostomIntroduction,
		IMethodGetCostomRelativeLandscape,
		IMethodGetFeaturedCourseDaySum,
		IMethodGetFeaturedCourseIntroduction,
		IMethodGetHotelInfoHotelIntroduction,
		IMethodGetLandscapeIntroduction,
		IMethodGetLandscapeSerial,
		IMethodGetLandscapeSightInvolved,
		IMethodGetLandscapeTicketPrice,
		IMethodGetLandscapeVisitTime,
		IMethodGetPath2BYDRoute,
		IMethodGetYachtCapacity,
		IMethodGetYachtPrice,
		IMethodSearchAdjoinedLandscape,
		IMethodSearchCostom,
		IMethodSearchFeaturedCourse,
		IMethodSearchHotelInfo,
		IMethodSearchLandscape,
		IMethodSearchPath2BYD,
		IMethodSearchYacht,
		IMethodCheckApp,
		IMethodGetUserId {

	private String apiId;
	private String sessionKey;
	private String sig;
	private String serverUrl;

	public ProxyWineMethod(String apiId, String sessionKey, String sig) {
		this.apiId = apiId;
		this.sessionKey = sessionKey;
		this.sig = sig;
	}

	public ProxyWineMethod(String apiId, String sessionKey, String sig,
			String serverUrl) {
		this.apiId = apiId;
		this.sessionKey = sessionKey;
		this.sig = sig;
		this.serverUrl = serverUrl;
	}

	public int getAdjoinedLandscapeDistance(String adjoinedLandscapeName) {
		MethodGetAdjoinedLandscapeDistance adjoinedLandscapeDistance = new MethodGetAdjoinedLandscapeDistance(
				apiId, sessionKey, sig, serverUrl);
		return adjoinedLandscapeDistance
				.getAdjoinedLandscapeDistance(adjoinedLandscapeName);
	}

	public String getAdjoinedLandscapeLocation(String adjoinedLandscapeName) {
		MethodGetAdjoinedLandscapeLocation adjoinedLandscapeLocation = new MethodGetAdjoinedLandscapeLocation(
				apiId, sessionKey, sig, serverUrl);
		return adjoinedLandscapeLocation
				.getAdjoinedLandscapeLocation(adjoinedLandscapeName);
	}

	public int getAdjoinedLandscapePrice(String adjoinedLandscapeName) {
		MethodGetAdjoinedLandscapePrice adjoinedLandscapePrice = new MethodGetAdjoinedLandscapePrice(
				apiId, sessionKey, sig, serverUrl);
		return adjoinedLandscapePrice.getAdjoinedLandscapePrice(adjoinedLandscapeName);
	}

	public int getAdjoinedLandscapeTime(String adjoinedLandscapeName) {
		MethodGetAdjoinedLandscapeTime adjoinedLandscapeTime = new MethodGetAdjoinedLandscapeTime(
				apiId, sessionKey, sig, serverUrl);
		return getAdjoinedLandscapeTime(adjoinedLandscapeName);
	}

	public String getCostomIntroduction(String costomName) {
		MethodGetCostomIntroduction costomIntroduction = new MethodGetCostomIntroduction(
				apiId, sessionKey, sig, serverUrl);
		return costomIntroduction.getCostomIntroduction(costomName);
	}

	public String getCostomRelativeLandscape(String costomName) {
		MethodGetCostomRelativeLandscape costomRelativeLandscape = new MethodGetCostomRelativeLandscape(
				apiId, sessionKey, sig, serverUrl);
		return costomRelativeLandscape.getCostomRelativeLandscape(costomName);
	}

	public int getFeaturedCourseDaySum(String featuredCourseName) {
		MethodGetFeaturedCourseDaySum featuredCourseDaySum = new MethodGetFeaturedCourseDaySum(
				apiId, sessionKey, sig, serverUrl);
		return featuredCourseDaySum
				.getFeaturedCourseDaySum(featuredCourseName);
	}

	public String getFeaturedCourseIntroduction(String featuredCourseName) {
		MethodGetFeaturedCourseIntroduction featuredCourseIntroduction = new MethodGetFeaturedCourseIntroduction(
				apiId, sessionKey, sig, serverUrl);
		return featuredCourseIntroduction
				.getFeaturedCourseIntroduction(featuredCourseName);
	}

	public String getHotelInfoHotelIntroduction(String hotelName) {
		MethodGetHotelInfoHotelIntroduction hotelInfoHotelIntroduction = new MethodGetHotelInfoHotelIntroduction(
				apiId, sessionKey, sig, serverUrl);
		return hotelInfoHotelIntroduction
				.getHotelInfoHotelIntroduction(hotelName);
	}

	public String getLandscapeIntroduction(String landscapeName) {
		MethodGetLandscapeIntroduction landscapeIntroduction = new MethodGetLandscapeIntroduction(
				apiId, sessionKey, sig, serverUrl);
		return landscapeIntroduction.getLandscapeIntroduction(landscapeName);
	}

	public int getLandscapeSerial(String landscapeName) {
		MethodGetLandscapeSerial landscapeSerial = new MethodGetLandscapeSerial(
				apiId, sessionKey, sig, serverUrl);
		return landscapeSerial.getLandscapeSerial(landscapeName);
	}

	public String getLandscapeSightInvolved(String landscapeName) {
		MethodGetLandscapeSightInvolved landscapeSightInvolved = new MethodGetLandscapeSightInvolved(
				apiId, sessionKey, sig, serverUrl);
		return landscapeSightInvolved.getLandscapeSightInvolved(landscapeName);
	}

	public int getLandscapeTicketPrice(String landscapeName) {
		MethodGetLandscapeTicketPrice landscapeTicketPrice = new MethodGetLandscapeTicketPrice(
				apiId, sessionKey, sig, serverUrl);
		return landscapeTicketPrice.getLandscapeTicketPrice(landscapeName);
	}

	public int getLandscapeVisitTime(String landscapeName) {
		MethodGetLandscapeVisitTime landscapeVisitTime = new MethodGetLandscapeVisitTime(
				apiId, sessionKey, sig, serverUrl);
		return landscapeVisitTime.getLandscapeVisitTime(landscapeName);
	}

	public String getPath2BYDRoute(String start) {
		MethodGetPath2BYDRoute path2BYDRoute = new MethodGetPath2BYDRoute(
				apiId, sessionKey, sig, serverUrl);
		return path2BYDRoute.getPath2BYDRoute(start);
	}

	public int getYachtCapacity(String type) {
		MethodGetYachtCapacity yachtCapacity = new MethodGetYachtCapacity(
				apiId, sessionKey, sig, serverUrl);
		return yachtCapacity.getYachtCapacity(type);
	}

	public int getYachtPrice(String type) {
		MethodGetYachtPrice yachtPrice = new MethodGetYachtPrice(apiId,
				sessionKey, sig, serverUrl);
		return yachtPrice.getYachtPrice(type);
	}

	public List<org.grapes.wine.api.bean.SearchAdjoinedLandscapeBean.SmallBean> searchAdjoinedLandscape(
			String match) {
		MethodSearchAdjoinedLandscape adjoinedLandscape = new MethodSearchAdjoinedLandscape(
				apiId, sessionKey, sig, serverUrl);
		return adjoinedLandscape.searchAdjoinedLandscape(match);
	}

	public List<org.grapes.wine.api.bean.SearchCostomBean.SmallBean> searchCostom(
			String match) {
		MethodSearchCostom costom = new MethodSearchCostom(apiId, sessionKey,
				sig, serverUrl);
		return costom.searchCostom(match);
	}

	public List<org.grapes.wine.api.bean.SearchFeaturedCourseBean.SmallBean> searchFeaturedCourse(
			String match) {
		MethodSearchFeaturedCourse featuredCourse = new MethodSearchFeaturedCourse(
				apiId, sessionKey, sig, serverUrl);
		return featuredCourse.searchFeaturedCourse(match);
	}

	public List<org.grapes.wine.api.bean.SearchHotelInfoBean.SmallBean> searchHotelInfo(
			String match) {
		MethodSearchHotelInfo hotelInfo = new MethodSearchHotelInfo(apiId,
				sessionKey, sig, serverUrl);
		return hotelInfo.searchHotelInfo(match);
	}

	public List<org.grapes.wine.api.bean.SearchLandscapeBean.SmallBean> searchLandscape(
			String match) {
		MethodSearchLandscape landscape = new MethodSearchLandscape(apiId,
				sessionKey, sig, serverUrl);
		return landscape.searchLandscape(match);
	}

	public List<org.grapes.wine.api.bean.SearchPath2BYDBean.SmallBean> searchPath2BYD(
			String match) {
		MethodSearchPath2BYD path2BYD = new MethodSearchPath2BYD(apiId,
				sessionKey, sig, serverUrl);
		return path2BYD.searchPath2BYD(match);
	}

	public List<org.grapes.wine.api.bean.SearchYachtBean.SmallBean> searchYacht(
			String match) {
		MethodSearchYacht yacht = new MethodSearchYacht(apiId, sessionKey, sig, serverUrl);
		return yacht.searchYacht(match);
	}

	public boolean checkApp(String apiId, String sessionKey, String sig) {
		MethodCheckApp app = new MethodCheckApp(apiId, sessionKey, sig, serverUrl);
		return app.checkApp(apiId, sessionKey, sig);
	}

	public String getUserId(String apiId, String sessionKey, String sig) {
		MethodGetUserId userId = new MethodGetUserId(apiId, sessionKey, sig, serverUrl);
		return userId.getUserId(apiId, sessionKey, sig);
	}
}
